﻿<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/common/topBegin.jsp"%>
<link rel="stylesheet" type="text/css" href="${ctx}/js/public/Validform/css/Validform.css"/>
<link rel="stylesheet" type="text/css" href="${ctx}/js/public/Validform/css/right_yz.css"/>
 <script type="text/javascript" src="${ctx}/js/jquery-1.7.1.min.js"></script>
 <script language="JavaScript" type="text/javascript" src="${ctx}/js/public/Validform/Validform_v5.3.2.js"></script>
 <script language="JavaScript" type="text/javascript" src="${ctx}/js/public/Validform/right_Validform_v5.3.2_config.js"></script>
 <script type="text/javascript" src="${ctx}/js/extjs/ext-base.js"></script>
<script type="text/javascript" src="${ctx}/js/extjs/ext-all.js"></script>
<script type="text/javascript" src="${ctx}/js/extjs/ui/ext-ui.js"></script>
<script type="text/javascript" src="${ctx}/js/public/console.js"></script>
<script type="text/javascript" src="${ctx}/js/extjs/ux/Toast.js"></script>
<script>
var cfg = {cxt:'${ctx}'};
<c:if test="${not empty entity}">
	<c:set var="url" value="company/update.action"/>
</c:if>
<c:if test="${ empty entity}">
<c:set var="url" value="company/add.action"/>
</c:if>
</script>
</head>
<body>
<div  id="table_form_div" class="table_form1">
<form  action="${ctx}/${url}" method="post" id="formobj" enctype="multipart/form-data">
 <input type="hidden" id="subBtn"   />
 <input type="hidden" id="backTip"  value="操作成功" />
  <table class="table-form" width="100%">
   <tbody>
      <tr>
	       <td width="15%" class="table-th">企业名称<font color="red">*</font></td>
	       <td class="table-td" colspan="3">
	           <input type="text" id="name"  class="input-text" style="width:98%;" name="name" value="${entity.name}" maxlength="64"   datatype="*" />
	       </td>
	  </tr>
	  <tr>
	       <td width="15%" class="table-th">营业执照<font color="red">*</font></td>
           <td class="table-td" width="35%">
           		<input type="text" id="bussinessRegisteNum"  class="input-text" style="width:90%;" name="bussinessRegisteNum" value="${entity.bussinessRegisteNum}" maxlength="32"   datatype="*" />
           </td>
           <td width="15%" class="table-th">营业执照有效期<font color="red">*</font></td>
           <td class="table-td" width="35%">
				<span id="sp_bussinessRegisteValidity" ></span>
                <input type="hidden"   id="hid_bussinessRegisteValidity" value="${entity.bussinessRegisteValidity}"/>           		
           </td>
	  </tr>
	  
	   <tr>
	      <td width="15%" class="table-th">经营许可证</td>
	      <td class="table-td" width="35%"><input type="text" id="bussinessLicenseNum"  class="input-text" style="width:90%;" name="bussinessLicenseNum" value="${entity.bussinessLicenseNum}" maxlength="32"  datatype="*" />
	      </td>
	       <td width="15%" class="table-th">许可证有效期<font color="red">*</font></td>
           <td class="table-td" width="35%">
				<span id="sp_bussinessLicenseValidity" ></span>
                <input type="hidden"   id="hid_bussinessLicenseValidity" value="${entity.bussinessLicenseValidity}"/>           		
           </td>
      </tr>
      <tr>
           <td  width="15%" class="table-th">企业联系人<font color="red">*</font></td>
           <td class="table-td"  width="35%">
           		<input type="text" id="contractor"  class="input-text" style="width:90%;" name="contractor" value="${entity.contractor}" maxlength="16"   datatype="*" />
           </td>
            <td  width="15%" class="table-th">企业联系人电话<font color="red">*</font></td>
           <td class="table-td"  width="35%">
           		<input type="text" id="contractPhone"  class="input-text" style="width:90%;" name="contractPhone" value="${entity.contractPhone}" maxlength="16"   datatype="m|phone" />
           </td>
          
      </tr>
      
       <tr>
           <td  width="15%" class="table-th">企业法人代表<font color="red">*</font></td>
           <td class="table-td"  width="35%">
           		<input type="text" id="legalMan"  class="input-text" style="width:90%;" name="legalMan" value="${entity.legalMan}" maxlength="16"   datatype="*" />
           </td>
            <td  width="15%" class="table-th">企业法人代表联系电话</td>
           <td class="table-td"  width="35%">
           		<input type="text" id="legalManPhone"  class="input-text" style="width:90%;" name="legalManPhone" value="${entity.legalManPhone}" maxlength="16"   datatype="m|phone" ignore="ignore" />
           </td>
          
      </tr>
      
      <tr>
      	 <td  width="15%" class="table-th">传真</td>
           <td class="table-td"  width="35%">
           		<input type="text" id="fax" name="fax" class="input-text" style="width:90%;" name="fax" value="${entity.fax}" maxlength="16"   datatype="m|phone" ignore="ignore" />
           </td>
            <td  width="15%" class="table-th">企业邮箱</td>
           <td class="table-td"  width="35%">
           		<input type="text" id="email"  class="input-text" style="width:90%;" name="email" value="${entity.email}" maxlength="50"   datatype="e"  ignore="ignore"/>
           </td>
      </tr>
	  
      <tr>
	      <td width="15%" class="table-th">所在区域<font color="red">*</font></td>
	      	 <td  colspan="3">
      	 		<span style="margin:8px 10px;">
      	 			<select id="province" name="provinceId" style="width:120px;" datatype="*"></select>
      	 			<input type="hidden" id="provinceName" name="provinceName" value="${entity.provinceName }"/>
      	 		</span>
	      	  	<span style="margin:8px 10px;">
	      	  		<select id="city" name="cityId"  style="width:120px;display:none" datatype="*"></select>
	      	  		<input type="hidden" id="cityName"  name="cityName" value="${entity.cityName }"/>
	      	  	</span>
	     		<span style="margin:8px 10px;">
	     			<select id="area" name="areaId"  style="width:150px;display:none" datatype="*"></select>
	     			<input type="hidden" id="areaName" " name="areaName" value="${entity.areaName }"/>
	     		</span>
       		 	<span style="margin:8px 10px;">
       		 		<select id="street"  name="streetId" style="width:150px;display:none"></select>
       		 		<input type="hidden" id="streetName" name="streetName" value="${entity.streetName }"/>
       		 	</span>
		     </td>
      </tr>
     <tr>
      <td width="15%" class="table-th">经营范围<font color="red">*</font></td>
	       <td class="table-td" colspan="3">
	           <textArea id="bussinessScope"  class="textarea" style="width:98%;" cols="75" rows="3" name="bussinessScope"  maxlength="255"   datatype="*" >${entity.bussinessScope }</textArea>
	       </td>
     </tr>
     <tr>
      <td width="15%" class="table-th">地址<font color="red">*</font></td>
	       <td class="table-td" colspan="3">
	           <textArea id="address"  class="textarea" style="width:98%;" cols="75" rows="3" name="address"  maxlength="100"   datatype="*" >${entity.address }</textArea>
	       </td>
     </tr>
     <tr>
      <td width="15%" class="table-th">备注</td>
	       <td class="table-td" colspan="3">
	           <textArea id="remark"  class="textarea" style="width:98%;" cols="75" rows="6" name="remark"  maxlength="500" >${entity.remark }</textArea>
	       </td>
     </tr>
	 </tbody>
  </table>
   <input type="hidden" id="id"  name="id" value="${entity.id}" />
   <input type="hidden" id="type" name="type" value="${type }"/>
   <input type="hidden" id="carryCompanyId" name="carryCompanyId" value="${carryCompanyId}"/>
  </form>
  </div>
  <script type="text/javascript" src="${ctx}/js/public/area-jquery.js"></script>
  <script>
  //营业执照有效期日历控件渲染组件
  var bussinessRegisteValidityTime=Ext.get('hid_bussinessRegisteValidity').dom.value;//营业执照有效日期
  new Ext.form.DateField({
		id : 'dtbussinessRegisteValidity',
		width : 170,
		editable : true,
		format : "Y-m-d",
		name : 'bussinessRegisteValidity',
		renderTo : 'sp_bussinessRegisteValidity',
		allowBlank : false,
		value:Ext.isEmpty(bussinessRegisteValidityTime)?null:new Date(bussinessRegisteValidityTime.substr(0,10))
	});
  //许可证有效期日历控件渲染组件
  var bussinessLicenseValidityTime=Ext.get('hid_bussinessLicenseValidity').dom.value;//许可证有效日期
  new Ext.form.DateField({
			id : 'dtbussinessLicenseValidity',
			width : 170,
			editable : true,
			format : "Y-m-d",
			name : 'bussinessLicenseValidity',
			renderTo : 'sp_bussinessLicenseValidity',
			allowBlank : false,
			value:Ext.isEmpty(bussinessLicenseValidityTime)?null:new Date(bussinessLicenseValidityTime.substr(0,10))
		});
	$.areaInitByJson('${ctx}/area/areaList.action');
	$("#province").areaSelectedText("${entity.provinceId}");
	$('#city').areaCascadeByJson('province','${ctx}/area/areaList.action','${entity.cityId}');
	$("#area").areaCascadeByJson('city','${ctx}/area/areaList.action','${entity.areaId}');
	$("#street").areaCascadeByJson('area','${ctx}/area/areaList.action','${entity.streetId}');
  </script>
  </body>
  </html>
  